FROM xmpython:base
ENV APP_PATH=/mnt/d/code/mcp-weather-agent

WORKDIR $APP_PATH
COPY ./mcp-weather-agent mcp-weather-agent 
COPY ./misc misc 
COPY ./config config 
# 优先复制依赖文件以利用缓存
COPY ./misc/requirements.txt .

# 使用国内 PyPI 镜像加速安装
RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple -r requirements.txt

ENV PYTHONPATH ${APP_PATH}:/${APP_PATH}/config:${APP_PATH}/mcp-weather-agent:$PYTHONPATH